home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7651 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.0 KB

  1. Path: howland.reston.ans.net!psinntp!psinntp!psinntp!pipeline!not-for-mail
  2. From: johndill@nyc.pipeline.com (John Dillworth)
  3. Newsgroups: comp.lang.c
  4. Subject: C prog needs help with win 3.1
  5. Date: 27 Feb 1996 18:27:15 -0500
  6. Organization: The Pipeline
  7. Message-ID: <4h040j$23v@pipe11.nyc.pipeline.com>
  8. NNTP-Posting-Host: pipe11.nyc.pipeline.com
  9. X-PipeUser: johndill
  10. X-PipeHub: nyc.pipeline.com
  11. X-PipeGCOS: (John Dillworth)
  12. X-Newsreader: The Pipeline v3.4.0
  13.  
  14. I need to insert a blank line between each printed line of text in this
  15. Windows program fragment: 
  16.  
  17.  
  18.                for (i = nPaintBeg ; i < nPaintEnd ; i++) 
  19.                     { 
  20.                      
  21.                     
  22.                     
  23.                     x = cxChar * (1 - nHscrollPos) ; 
  24.                     y = cyChar * (1 - nVscrollPos + i) ; 
  25.  
  26.                     TextOut (hdc, x, y, 
  27.                              sysmetrics[i].szLabel, 
  28.                  lstrlen (sysmetrics[i].szLabel)) ; 
  29.  
  30.                     TextOut (hdc, x + 22 * cxCaps, y, 
  31.                              sysmetrics[i].szDesc, 
  32.                  lstrlen (sysmetrics[i].szDesc)) ; 
  33.                   
  34.                  TextOut (hdc, x, y, 
  35.                              sysmetrics[i].szLabel, 
  36.                  lstrlen (sysmetrics[i].szLabel)) ; 
  37.  
  38.                     TextOut (hdc, x + 22 * cxCaps, y, 
  39.                              sysmetrics[i].szDesc, 
  40.                  lstrlen (sysmetrics[i].szDesc)) ; 
  41.                    
  42.  
  43.                     SetTextAlign (hdc, TA_RIGHT | TA_TOP) ; 
  44.  
  45.                     TextOut (hdc, x + 22 * cxCaps + 40 * cxChar, y, 
  46.                              szBuffer, 
  47.                              wsprintf (szBuffer, "%5d", 
  48.                   GetSystemMetrics (sysmetrics[i].nIndex))) ; 
  49.  
  50.                     SetTextAlign (hdc, TA_LEFT | TA_TOP) ; 
  51.                //     wsprintf (szBuffer, "/n/a"  ); 
  52.                      
  53.                     } 
  54. Now in C I plain old ANSI C I would just put a couple of printf's with
  55. newline characters.  This dosn't work with windows (this is c huh??  ;-) ).
  56.  How do I insert blank line between each line of text in this program? 
  57.  
  58. Thanks in advance
  59.